package com.meilingcloud.common.enums;

import org.apache.commons.lang3.StringUtils;

public enum ShiftType {

    CONTAINER("0", "转移容器"),
    SAMPLE("1", "转移样本"),
    ;

    private final String code;
    private final String info;

    ShiftType(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public static ShiftType getTypeByCode(String value) {
        if (StringUtils.isBlank(value)) {
            return null;
        }
        for (ShiftType type : ShiftType.values()) {
            if (type.getCode().equals(value)) {
                return type;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }

}
